package com.ys.web.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 最优行业关键词
 * @author wdj
 *
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "best_keyword", catalog = "ysanalyze")
public class BestKeyword implements java.io.Serializable {

	private Integer id;
	/**所属行业id*/
	private Integer industryId;
	/***标题（细分行业）*/
	private String title; 
	/**推广日期*/
	private Date promotionDate;	
	/**推广关键词*/
	private String promotionKeyword;
	/**搜索关键词*/
	private String keywordSearch;
	/**保存时间*/
	private Date saveDate;
	/**备注*/
	private String remark;
	
	public BestKeyword() {		
	}

	public BestKeyword(Integer industryId, Date promotionDate, String title, 
			String promotionKeyword, String keywordSearch, Date saveDate, String remark) {
		this.industryId = industryId;
		this.promotionDate = promotionDate;
		this.title = title;
		this.promotionKeyword = promotionKeyword;
		this.keywordSearch = keywordSearch;
		this.saveDate = saveDate;
		this.remark = remark;	
	}
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "industry_id", nullable = false)
	public Integer getIndustryId() {
		return industryId;
	}

	public void setIndustryId(Integer industryId) {
		this.industryId = industryId;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "promotion_date", nullable = false, length = 19)
	public Date getPromotionDate() {
		return promotionDate;
	}

	public void setPromotionDate(Date promotionDate) {
		this.promotionDate = promotionDate;
	}

	@Column(name = "title", nullable = false, length=100)
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

//  @Lob   
//	@Basic(fetch = FetchType.LAZY)   
//	@Type(type = "text")  
//	@Column(name = "promotion_keyword", nullable = false) 
	@Column(name = "promotion_keyword", nullable = false, length = 100)
	public String getPromotionKeyword() {
		return promotionKeyword;
	}

	public void setPromotionKeyword(String promotionKeyword) {
		this.promotionKeyword = promotionKeyword;
	}

	@Column(name = "keyword_search", nullable = false, length = 100)
	public String getKeywordSearch() {
		return keywordSearch;
	}

	public void setKeywordSearch(String keywordSearch) {
		this.keywordSearch = keywordSearch;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "save_date", nullable = false, length = 19)
	public Date getSaveDate() {
		return saveDate;
	}

	public void setSaveDate(Date saveDate) {
		this.saveDate = saveDate;
	}

	@Column(name = "remark", nullable = false, length = 100)
	public String getRemark() {
		return remark;
	}
	
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
}
